package Warning;

import javax.swing.*;
import java.awt.*;

public class ShowUI extends JFrame{
    String title;
    public ShowUI(String title,String warn){
        this.title = title;
        setDefaultCloseOperation(DISPOSE_ON_CLOSE);
        setLocationRelativeTo(null);
        setTitle(title);
        setSize(400,100);
        JLabel label = new JLabel("<html>"+warn+"</html>",SwingConstants.CENTER);
        label.setBounds(50,30,300,70);
        label.setFont(new Font("楷体",Font.BOLD,20));
        getContentPane().add(label);
        setVisible(true);
    }
}
